import request from '/@/utils/request';

export function fetchList(query?: Object) {
	return request({
		url: '/admin/file/page',
		method: 'get',
		params: query,
	});
}

export function upload(obj?: Object) {
	return request({
		url: '/admin/file/upload',
		method: 'post',
		data: obj,
	});
}

export function download(bucketName?: string, fileName?: string) {
	return request({
		url: '/admin/file/download/' + bucketName + '/fileName/' + fileName,
		method: 'get',
	});
}

export function delObj(ids?: Object) {
	return request({
		url: '/admin/file/delete',
		method: 'delete',
		data: ids,
	});
}
